<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
       .s1{
            width: 600px;
            /* height: 600px; */
            padding: 10px 0;
            background-color: yellowgreen;
         }
         .s2{
             width: 300px;
             height: 300px;
             margin: 10px auto;
             background-color: cornsilk;
         }
         
    </style>
</head>
<body>
    <div class="s1">
        <div class="s2"></div>
    </div>
</body>
</html>